# 使用 cmake -P main.cmake 执行对应.cmake文件
cmake_minimum_required(VERSION 3.20)

set(num 1)
while(num LESS 5)
    math(EXPR num "${num} + 1")   # 真正的 +1
    message(STATUS "num = ${num}")
endwhile()